package com.tfjybj.itoo.teach.provider.facade;

import org.apache.dubbo.config.annotation.Service;
import com.github.pagehelper.PageInfo;
import com.tfjybj.itoo.teach.FacadeApi.TeacherTeachClassApi;
import com.tfjybj.itoo.teach.entity.TeacherTeachClassEntity;
import com.tfjybj.itoo.teach.provider.service.TeacherTeachClassService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * Created by 郝雨烁 on 2019/5/21.
 */
@Service
@org.springframework.stereotype.Service
public class TeacherTeachClassFacade implements TeacherTeachClassApi{

    @Autowired
    TeacherTeachClassService teacherTeachClassService;

    @Override
    public boolean save(TeacherTeachClassEntity teacherTeachClassEntity){
        return  teacherTeachClassService.save(teacherTeachClassEntity);
    }
    @Override
    public boolean removeById(String id) {
        return  teacherTeachClassService.removeById(id);
    }

    @Override
    public boolean removeByIds( List<String> ids) {
        return teacherTeachClassService.removeByIds(ids);

    }

    @Override
    public boolean updateById(TeacherTeachClassEntity teacherTeachClassEntity) {
       return teacherTeachClassService.updateById(teacherTeachClassEntity);

    }
    @Override
    public TeacherTeachClassEntity getById(String id) {
     return  teacherTeachClassService.getById(id);
    }


    @Override
    public  PageInfo<TeacherTeachClassEntity> queryPageAll(Integer pageNo, Integer pageSize) {
        PageInfo<TeacherTeachClassEntity> teacherTeachClasss = teacherTeachClassService.queryPageAll(pageNo, pageSize);
        return teacherTeachClasss;
    }

    @Override
    public List findByTeacherId( String teacherId, String templateId, String courseId) {

        return teacherTeachClassService.getByTeacherId(teacherId,templateId,courseId);
    }
}
